package lesson19.notepad;

import java.util.Scanner;

public class NotepadDemo {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		System.out.println("Please enter a number of pages of the Notepad: ");
		int numberOfPages = sc.nextInt();
		
		SimpleNotepad simpleNotepad = new SimpleNotepad(numberOfPages);
		
		System.out.println("Please enter a number of pages of the secured Notepad: ");
		int securedNumberOfPages = sc.nextInt();		
		System.out.println("Please enter a password for the secured Notepad: ");
		String password = sc.next();
		
		SecuredNotepad securedNotepad = new SecuredNotepad(password, securedNumberOfPages);
		
		System.out.println("Enter text: ");
		String addedText = sc.next();
		System.out.println("Enter page number: ");
		int page = sc.nextInt();
		simpleNotepad.addText(addedText, page);
		
		System.out.println("Enter secured Notepad text: ");
		String securedAddedText = sc.next();
		System.out.println("Enter secured page number: ");
		int securedPage = sc.nextInt();		
		securedNotepad.addText(securedAddedText, securedPage);
		
		System.out.println("================");
		simpleNotepad.printPages();
		
		System.out.println("================");
		securedNotepad.printPages();
		
		simpleNotepad.deleteText(simpleNotepad.getPage(1));
		
		securedNotepad.deleteText(securedNotepad.getPage(1));
		
		sc.close();

	}

}
